﻿using GroupProject.Adapter.Interfaces;
using GroupProject.Data.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using GroupProject.Data;
using System.Data.Entity;

namespace GroupProject.Adapters.Adapters
{
    public class StudentAdapter : IStudentAdapter

    {
        public List<Student> GetAllStudents()
        {
            List<Student> model;
            using (ApplicationDbContext db = new ApplicationDbContext())
            {
                model = db.Students.Include("Courses").ToList();
            }
            return model;
        }

    }
}